<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Focus Flow - 专注工作助手</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body class="light-theme">
    <div class="app-container">
        <!-- 侧边栏 -->
        <aside class="sidebar">
            <div class="logo">
                <i class="fas fa-brain"></i>
                <span>Focus Flow</span>
            </div>
            <nav class="nav-menu">
                <button class="nav-item active" data-panel="tasks">
                    <i class="fas fa-tasks"></i>
                    <span>任务</span>
                </button>
                <button class="nav-item" data-panel="timer">
                    <i class="fas fa-clock"></i>
                    <span>计时器</span>
                </button>
                <button class="nav-item" data-panel="sounds">
                    <i class="fas fa-volume-up"></i>
                    <span>白噪音</span>
                </button>
            </nav>
            <div class="sidebar-footer">
                <button id="themeToggle">
                    <i class="fas fa-moon"></i>
                </button>
                <button id="settingsBtn">
                    <i class="fas fa-cog"></i>
                </button>
            </div>
        </aside>

        <!-- 主内容区 -->
        <main class="main-content">
            <!-- 任务面板 -->
            <section class="panel active" id="tasksPanel">
                <div class="panel-header">
                    <h2>任务清单</h2>
                    <button class="add-task-btn" id="addTaskBtn">
                        <i class="fas fa-plus"></i> 新建任务
                    </button>
                </div>
                <div class="task-filters">
                    <button class="filter-btn active" data-filter="today">今日</button>
                    <button class="filter-btn" data-filter="week">本周</button>
                    <button class="filter-btn" data-filter="all">所有</button>
                </div>
                <div class="tasks-container" id="tasksList">
                    <!-- 任务列表将通过 JavaScript 动态添加 -->
                </div>
            </section>

            <!-- 计时器面板 -->
            <section class="panel" id="timerPanel">
                <div class="timer-container">
                    <div class="timer-display">
                        <div class="timer-circle">
                            <div class="timer-time" id="timerDisplay">25:00</div>
                            <div class="timer-label" id="timerLabel">工作时间</div>
                        </div>
                    </div>
                    <div class="timer-controls">
                        <button class="timer-btn" id="startTimer">
                            <i class="fas fa-play"></i>
                        </button>
                        <button class="timer-btn" id="pauseTimer" disabled>
                            <i class="fas fa-pause"></i>
                        </button>
                        <button class="timer-btn" id="resetTimer">
                            <i class="fas fa-redo"></i>
                        </button>
                    </div>
                    <div class="timer-stats">
                        <div class="stat-item">
                            <span class="stat-label">今日完成</span>
                            <span class="stat-value" id="completedPomodoros">0</span>
                        </div>
                        <div class="stat-item">
                            <span class="stat-label">专注时长</span>
                            <span class="stat-value" id="totalFocusTime">0分钟</span>
                        </div>
                    </div>
                </div>
            </section>

            <!-- 白噪音面板 -->
            <section class="panel" id="soundsPanel">
                <div class="panel-header">
                    <h2>白噪音</h2>
                    <button class="master-volume">
                        <i class="fas fa-volume-up"></i>
                    </button>
                </div>
                <div class="sounds-grid">
                    <div class="sound-card" data-sound="rain">
                        <div class="sound-icon">
                            <i class="fas fa-cloud-rain"></i>
                        </div>
                        <div class="sound-info">
                            <span class="sound-name">雨声</span>
                            <input type="range" class="volume-slider" min="0" max="100" value="50">
                        </div>
                    </div>
                    <div class="sound-card" data-sound="waves">
                        <div class="sound-icon">
                            <i class="fas fa-water"></i>
                        </div>
                        <div class="sound-info">
                            <span class="sound-name">海浪</span>
                            <input type="range" class="volume-slider" min="0" max="100" value="50">
                        </div>
                    </div>
                    <div class="sound-card" data-sound="cafe">
                        <div class="sound-icon">
                            <i class="fas fa-coffee"></i>
                        </div>
                        <div class="sound-info">
                            <span class="sound-name">咖啡厅</span>
                            <input type="range" class="volume-slider" min="0" max="100" value="50">
                        </div>
                    </div>
                    <div class="sound-card" data-sound="fire">
                        <div class="sound-icon">
                            <i class="fas fa-fire"></i>
                        </div>
                        <div class="sound-info">
                            <span class="sound-name">篝火</span>
                            <input type="range" class="volume-slider" min="0" max="100" value="50">
                        </div>
                    </div>
                </div>
            </section>
        </main>

        <!-- 迷你播放器 -->
        <div class="mini-player" id="miniPlayer">
            <div class="mini-timer">
                <i class="fas fa-clock"></i>
                <span id="miniTimerDisplay">25:00</span>
            </div>
            <div class="mini-controls">
                <button id="miniPlayPause">
                    <i class="fas fa-play"></i>
                </button>
            </div>
            <div class="mini-sounds">
                <i class="fas fa-volume-up"></i>
                <span id="activeSoundsCount">0</span>
            </div>
        </div>
    </div>

    <!-- 任务编辑模态框 -->
    <div class="modal" id="taskModal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>新建任务</h3>
                <button class="close-modal">&times;</button>
            </div>
            <div class="modal-body">
                <form id="taskForm">
                    <div class="form-group">
                        <label for="taskTitle">任务名称</label>
                        <input type="text" id="taskTitle" required>
                    </div>
                    <div class="form-group">
                        <label for="taskPomodoros">预计番茄数</label>
                        <input type="number" id="taskPomodoros" min="1" value="1">
                    </div>
                    <div class="form-group">
                        <label for="taskPriority">优先级</label>
                        <select id="taskPriority">
                            <option value="low">低</option>
                            <option value="medium" selected>中</option>
                            <option value="high">高</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="taskDate">截止日期</label>
                        <input type="date" id="taskDate">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn-secondary close-modal">取消</button>
                <button class="btn-primary" id="saveTask">保存</button>
            </div>
        </div>
    </div>

    <script src="js/main.js" type="module"></script>
</body>
</html>
